package com.tarry.trade.counter.thirdpart.uuid;

public class MyUUID {
    private static MyUUID instance = new MyUUID();

    private SnowflakeIdWorker idWorker;
    public static MyUUID getInstance() {
        return instance;
    }

    private MyUUID() {}

    public void init(long centerId, long workerId) {
        idWorker = new SnowflakeIdWorker(centerId, workerId);
    }

    public long getUUID() {
        return idWorker.nextId();
    }
}
